package com.lianxi

import scala.collection.mutable.ArrayBuffer

/**
  * Created by adengdeng on 2017/8/7 
  */
object Lx6 {

  def main(args: Array[String]): Unit = {

    val a = Array(0, 1, -2, 3, -4, 5)
    println(a.sorted.reverse.mkString(" "))

    val b = ArrayBuffer(0, 1, -2, 3, -4, 5)
    println(b.sortWith(_ > _).mkString(" "))
  }
}
